package com.wlsk.license.common.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 包车牌状态
 */
public enum CharterPlateStatusEnum implements BaseEnum<CharterPlateStatusEnum, Integer> {

    DRAFT(0, "草稿"),

    SIGN(1, "待签发"),

    REVIEW(2, "待审核"),

    REVIEWED(3, "已审核未打印"),

    GENERATED(4, "已生成包车牌"),

    PRINTED(5, "已打印"),

    ARCHIVED(6, "已归档"),

    REPRINT(7, "作废重打"),

    REFILL(8, "打回重填"),

    TERMINATED(9, "已终止");

    private final Integer code;

    private final String description;

    private static Map<Integer, CharterPlateStatusEnum> valueMap = new HashMap<>();

    CharterPlateStatusEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    static {
        for (CharterPlateStatusEnum e : CharterPlateStatusEnum.values()) {
            valueMap.put(e.code, e);
        }
    }

    public static CharterPlateStatusEnum get(Integer value) {
        return valueMap.get(value);
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return description;
    }

    @Override
    public CharterPlateStatusEnum getByCode(Integer code) {
        return valueMap.get(code);
    }
}
